<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.io.stream.FormatStream</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.io.stream.FormatStream");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/FormatStream.d?rev=3327">tango.io.stream.FormatStream</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: Oct 2007<br><br>
<b>author:</b><br>Kris<br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/FormatStream.d?rev=3327#L40">FormatOutput</a></span>
<script>explorer.outline.addDecl('FormatOutput');</script> : Print!(char);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Simple way to hook up a utf8 formatter to an arbitrary OutputStream,
        such as a file:
        <pre class="d_code">

        <span class="k">auto</span> <span class="i">output</span> = <span class="k">new</span> <span class="i">FormatOutput</span> (<span class="k">new</span> <span class="i">FileOutput</span>(<span class="sl">"path"</span>));
        <span class="i">output</span>.<span class="i">formatln</span> (<span class="sl">"{} green bottles"</span>, <span class="n">10</span>);
        <span class="i">output</span>.<span class="i">close</span>;
        
</pre></font><br><br>
<font color="black">This is a trivial wrapper around the Print class, and is limited
        to emitting utf8 output. Use the Print class directly in order to
        generate utf16/32 output instead.<br><br>        Note that this class is a true instance of OutputStream, by way of
        inheritance via the Print superclass.<br><br></font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/stream/FormatStream.d?rev=3327#L51">this</a></span>
<script>explorer.outline.addDecl('this');</script>(OutputStream <span class="funcparam">stream</span>, bool <span class="funcparam">flush</span> = false);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Create a Layout instance and bind it to the given stream.
                The optional second argument controls implicit flushing of 
                newline&#40;&#41;, where true enables flushing. An explicit flush&#40;&#41; 
                will always flush the output.</font><br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2007 Kris Bell. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Tue Mar  4 22:45:33 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>